<%@ page language="java" import="java.util.*" pageEncoding="UTF-8" %>

<!DOCTYPE HTML>
<html>
<head>
    <%@ include file="/platform/style.jsp" %>
    <style>
        .ss0 {
            color: red
        }
    </style>
    <script>
        function query() {
            $w.execForm({pageNum: 1})
        }
        function available() {
            $w.doUrl(ctx + "/floor/UiFloorPage@updatestatus.page?bean.state=AVAILABLE", $("#queryForm").serializeArray(), function () {
                query()
            })
        }
        function unavailable() {
            $w.doUrl(ctx + "/floor/UiFloorPage@updatestatus.page?bean.state=UNAVAILABLE", $("#queryForm").serializeArray(), function () {
                query()
            })
        }
        function removed() {
            $w.doUrl(
                ctx + "/floor/UiFloorPage@updatestatus.page?bean.state=REMOVED", $("#queryForm").serializeArray(), function () {
                    query()
                })
        }
        function addUiFloor() {
            window.parent.$w.openDialog({
                url: ctx + '/floor/UiFloorPage@uiFloorAdd.page',
                title: "添加楼层 ",
                w: 600,
                h: 400,
                afterClose: function (re) {
                    if (re) $w.execForm();
                }
            });
        }
        function showPanel(id) {
            $w.openDialog({
                url: ctx + '/floor/UiFloorPanelPage@execute.page?bean.ui_floor_id='+id,
                title: "查看面板 ",
                w: 700,
                h: 400,
                maximized: true,
                afterClose: function (re) {
                    if ($w.listFlesh) $w.execForm();
                }
            });
        }

        function editUiFloor(id) {
            window.parent.$w.openDialog({
                url: ctx + '/floor/UiFloorPage@show.page?bean.id=' + id,
                title: "修改楼层 ",
                w: 540,
                h: 300,
                afterClose: function (re) {
                    if (re) $w.execForm();
                }
            });
        }
    </script>
</head>

<body class="easyui-layout">
<div data-options="region:'center'" class="bodybg">
    <!-- 查询区域 -->
    <form id="queryForm" action="/floor/UiFloorPage.page" method="post">
        <div class="easyui-panel ui-toolBar" border="false" data-options="doSize:false">
            <a href="javascript:;" class="easyui-linkbutton" plain="true" onclick="addUiFloor()" style="width:50px;">添加</a>
            <a href="javascript:;" class="easyui-linkbutton" plain="true" onclick="available()"
               style="width:50px;">展示</a>
            <a href="javascript:;" class="easyui-linkbutton" plain="true" onclick="unavailable()"
               style="width:50px;">隐藏</a>
            <a href="javascript:;" class="easyui-linkbutton" plain="true" onclick="removed()" style="width:50px;">删除</a>

        </div>
        <div class="ui_line" style="margin-top:10px"></div>
        <!-- 数据列表区域 -->
        <table class="ui-table" width="100%" cellpadding="1" cellspacing="1" data-options="showPage:false
																						<%--pageNum:<w:write bind="pageNum"/>,
																						pageSize:<w:write bind="pageSize_"/>,
																						total:<w:write bind="pagination.totalCount"/>--%>">
            <thead>
            <tr class="ui_th">
                <td width="35" align="center"><input type="checkbox" onclick="$selAllTbBoxs(this)"></td>
                <td width="40">ID</td>
                <td width="100">楼层标题</td>
                <td width="160">楼层颜色</td>
                <td width="160">使用平台</td>
                <td width="160">排序</td>
                <td width="160">创建时间</td>
                <td width="80">状态</td>
                <td width="150" align="center">修改</td>
            </tr>
            </thead>
            <tbody>
            <w:iterate id="info" bind="resultList_">
                <tr class="ui_td">
                    <td align="center"><input type="checkbox" name="primaryKey_" value="<w:write bind="#info.id"/>">
                    </td>
                    <td><w:write bind="#info.id"/></td>
                    <td><w:write bind="#info.title"/></td>
                    <td><w:write bind="#info.color"/></td>
                    <td>
                        <w:equal bind="#info.platform" value="PC">PC端</w:equal>
                        <w:equal bind="#info.platform" value="WE">微商城</w:equal>
                    </td>
                    <td><w:write bind="#info.sort_value"/></td>
                    <td><w:write bind="#info.create_time"/></td>
                    <td>
                    <w:equal bind="#info.state" value="AVAILABLE">展示</w:equal>
                    <w:equal bind="#info.state" value="UNAVAILABLE">隐藏</w:equal>
                    <w:equal bind="#info.state" value="REMOVED">删除</w:equal>
                    </td>
                    <td align="center">
                        <a href="javascript:void(0);" class="ui_btn marginR8"
                           onclick="editUiFloor(<w:write bind="#info.id"/>)">修改</a><a
                            href="javascript:void(0);" class="ui_btn marginR8"
                            onclick="showPanel(<w:write bind="#info.id"/>)">查看面板</a>
                    </td>
                </tr>
            </w:iterate>
            </tbody>
        </table>
    </form>
</div>
</body>
</html>
<script>

</script>